/*
  @author dmj1161859184@126.com 2018-08-04 17:01
  @version 1.0
  @since 1.0
*/

//Reference: https://yangbo5207.github.io/wutongluo/ji-chu-jin-jie-xi-lie/qi-3001-han-shu-yu-han-shu-shi-bian-cheng.html
//获取数组中所有的数值
function getNumbersWithCondition(array, condition) {
    //var res=[];
    let res = [];//es6开始
    array.forEach(function (item) {
        if (condition(item)) {
            res.push(item);
        }
    });
    return res;
}